home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / utilit~1 / tpipe.zoo / tpipe.1z / tpipe.1z
Encoding:
Text File  |  1992-07-04  |  2.2 KB  |  60 lines

  1.  
  2. NAME
  3.     tpipe  -  replicate  the  standard  output  into  an  additional
  4.     pipeline that is run in a subshell
  5.  
  6. SYNOPSIS
  7.     tpipe [ pipeline ]
  8.  
  9. DESCRIPTION
  10.     tpipe transcribes the standard input to the standard output  and
  11.     simultaneously   writes   an  additional  copy  to  a  specified
  12.     pipeline.
  13.  
  14.     tpipe  is  similar  to  tee(1)  except  that  tpipe  writes  the
  15.     duplicate  copy  of  its standard input to a command or pipeline
  16.     instead of a file.  This can help you avoid re-executing earlier
  17.     commands in the pipeline, writing temporary files, or  resorting
  18.     to the use of named pipes.
  19.  
  20.     The  specified  pipeline  is  always  executed  in a subshell by
  21.     sh(1), regardless of your current shell.  If a non-empty  string
  22.     is  supplied  as  the  argument,  it must be a valid pipeline or
  23.     command for sh(1).  Normally,  you  will  want  to  enclose  the
  24.     pipeline argument  in quotes ('' or "").  The type of quotes you
  25.     choose will affect variable substitution by your shell (see  the
  26.     man page for your shell, such as csh(1), for details).
  27.  
  28.     If  the  subshell  pipeline  writes to its standard output, this
  29.     output will go to the standard output of tpipe, where it will be
  30.     interspersed in an unpredictable way  with  the  other  copy  of
  31.     standard input.   Normally, this is not what you want.  Instead,
  32.     you would typically specify a subshell pipeline whose output  is
  33.     redirected to a file (as in the example below) or has some other
  34.     effect.
  35.  
  36. EXAMPLE
  37.  
  38.     % cmd1 <infile | tpipe "cmd2 | cmd3 >outfile" | cmd4
  39.  
  40.     which  has  the  effect  of  running  the output of command cmd1
  41.     simultaneously through two pipelines, "cmd2 | cmd3 >outfile" and
  42.     cmd4.  Diagramatically, in this example (this  will  look  wrong
  43.     with a variable-spaced font):
  44.     
  45.                          --> cmd2 --> cmd3 --> outfile
  46.                        /
  47.     infile  --> cmd1 -<
  48.                        \
  49.                          --> cmd4 -->  (standard output)
  50.  
  51. SEE ALSO
  52.     tee(1), sh(1), cat(1)
  53.  
  54. AUTHOR
  55.     David B Rosen
  56.  
  57.     THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT EXPRESS OR IMPLIED
  58.     WARRANTY.
  59.  
  60.